package com.atguigu.gulimall.product.service;

import com.atguigu.gulimall.product.vo.AttrGroupRelationVo;
import com.atguigu.gulimall.product.vo.AttrRespVO;
import com.atguigu.gulimall.product.vo.AttrVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.product.entity.AttrEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author fangdada
 * @email 1819675707@qq.com
 * @date 2021-04-30 21:16:24
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

	void saveAttr(AttrVO attr);

	PageUtils queryBaseAttrPage(Map<String, Object> params, Long catelogId, String type);

	AttrRespVO getAttrInfo(Long attrId);

	void updateAttr(AttrVO attr);

	List<AttrEntity> getRelationAttr(Long attrgroupId);

	void deleteRelation(AttrGroupRelationVo[] vos);

	PageUtils getNoRelationAttr(Long attrgroupId, Map<String, Object> params);

	/**
	 * 在指定的所有属性集合里面，查询出检索属性
	 * @author fd
	 * @date 2021/7/1 11:31
	 * @param attrIds
	 * @return java.util.List<java.lang.Long>
	 */
	List<Long> selectSearchAttrs(List<Long> attrIds);
}

